//
//  File.c
//  calculater
//
//  Created by 1 on 11-9-5.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#include <stdio.h>
int num1 = 0, num2 = 0;

int result( int in, int out );

int result(int in , int out)
{
    out = out * 10 + in ;
    return out ;
}

int remember1(int in1)
{
    num1 = in1;  
}

int remember2(int in2)
{
    num2 = in2;  
} 

int equalc(int option)
{
    switch (option) {
        case 1:
            return num1 + num2;
            break;
        case 2:  
            return num1 - num2;
            break;     
        case 3:
            return num1 * num2;
            break;      
        case 4:    
            return num1 / num2;
            break;
    }  
} 